package com.ruoyi.system.plugins.spring.model;

import com.ruoyi.system.plugins.modelmapper.convert.ModelConverter;
import lombok.Data;

import java.io.Serializable;
import java.util.Map;

/**
 * @author yali2
 */
@Data
public class SuperModel implements Serializable {
    private Map<String, Object> params;
    /**
     * 获取自动转换后的JavaBean对象
     *
     * @param clazz
     * @param <T>
     * @return
     */
    public <T> T convert(Class<T> clazz) {
        return ModelConverter.convert(clazz, this);
    }
}
